const express = require('express')

// 创建路由对象
const router = express.Router()

router.get('/get', (req, res) => {
  const query = req.query
  res.send({
    status: 200,
    messgae: 'sucess',
    data: query
  })
})

router.post('/post', (req, res) => {
  const body = req.body
  console.log(req.body);
  res.send({
    status: 200,
    messgae: 'post sucess',
    data: body
  })
})

module.exports = router